package cn.edu.wynu.api.collect.map;

import java.util.HashMap;

public class MapLearn {
    public static void main(String[] args) {
        StudentForMap zhangSan = new StudentForMap("张三", 18, "男", 100);
        StudentForMap liSi = new StudentForMap("李四", 18, "男", 99);
        Object o = new Object();

        HashMap<String, StudentForMap> studentMap = new HashMap<>();
        studentMap.put("张三", zhangSan);
        studentMap.put("李四", liSi);
        System.out.println(studentMap);

        studentMap.put("李四", zhangSan);
        System.out.println(studentMap);
    }
}
